Widening as Abstract Domain
نویسندگان
چکیده
Veri cation using static analysis often hinges on precise numeric invariants. Numeric domains of in nite height can infer these invariants, but require widening/narrowing which complicates the xpoint computation and is often too imprecise. As a consequence, several strategies have been proposed to prevent a precision loss during widening or to narrow in a smarter way. Most of these strategies are di cult to retro t into an existing analysis as they either require a pre-analysis, an on-they modi cation of the CFG, or modi cations to the xpoint algorithm. We propose to encode widening and its various re nements from the literature as co bered abstract domains that wrap standard numeric domains, thereby providing a modular way to add numeric analysis to any static analysis, that is, without modifying the xpoint engine. Since these domains cannot make any assumptions about the structure of the program, our approach is suitable to the analysis of executables, where the (potentially irreducible) CFG is re-constructed on-they. Moreover, our domain-based approach not only mirrors the precision of more intrusive approaches in the literature but also requires fewer iterations to nd a xpoint of loops than many heuristics that merely aim for precision. Adding numeric domains of in nite height to a static analysis requires that widening and/or narrowing is applied within each loop of the program to ensure termination [7]. Commonly, this is implemented by modifying the xpoint algorithm to perform upward and downward iterations while a pre-analysis determines necessary widening points. Firstly, downward iterations can be problematic since a widened state can induce a precision loss in other domains that cannot be reverted with the narrowed numeric state [17]. Secondly, determining a minimal set of widening points requires non-trivial algorithms for irreducible control ow graphs (CFGs) [6]. Worse, these algorithms cannot be applied in the context of analyzing machine code, as the CFG is re-constructed on-they while computing the xpoint [3]. Moreover, narrowing alone is often not enough to obtain precise xpoints which has been illustrated in many papers that present improved widenings/narrowings [10,11,12,15,17]. All of these approaches require disruptive changes to the xpoint engine, for instance, tracking several abstract states [10,12], temporarily disabling parts of the CFG [11], performing a preanalysis with di erent semantics [13,15], collecting \landmarks" [17] or referring to user-supplied thresholds [5]. This paper shows that widening and its various re nements can be implemented without modifying an existing xpoint engine, thereby making numeric domains available to analyses that are oblivious to the
منابع مشابه
Learning based Widening
Even though design of a widening operator is an integral step in the design of an abstract interpreter using an infinite domain, not much work has been done to systematize the design of widening operator. While there exist works that derive widening of higher-level domains by lifting the widening of the base-level domain, the design of widening for baselevel domains remains largely creative pro...
متن کاملWidening Operators for Weakly-Relational Numeric Abstractions (Extended Abstract)
In recent years there has been a lot of interest in the definition of so-called weakly-relational numeric domains, whose complexity and precision are in between the (non-relational) abstract domain of intervals [9] and the (relational) abstract domain of convex polyhedra [10]. The first weakly-relational domain proposed in the literature is based on systems of constraints of the form x−y ≤ c an...
متن کاملar X iv : c s . PL / 0 41 20 43 v 1 1 0 D ec 2 00 4 Widening Operators for Weakly - Relational Numeric Abstractions ⋆ ( Extended Abstract )
In recent years there has been a lot of interest in the definition of so-called weakly-relational numeric domains, whose complexity and precision are in between the (non-relational) abstract domain of intervals [9] and the (relational) abstract domain of convex polyhedra [10]. The first weakly-relational domain proposed in the literature is based on systems of constraints of the form x−y ≤ c an...
متن کاملWidening Operators for Weakly-Relational Numeric Abstractions
In recent years there has been a lot of interest in the definition of so-called weakly-relational numeric domains, whose complexity and precision are in between the (non-relational) abstract domain of intervals [9] and the (relational) abstract domain of convex polyhedra [10]. The first weakly-relational domain proposed in the literature is based on systems of constraints of the form x−y ≤ c an...
متن کاملLanguages with Concatenation ∗
Parsing for Two-staged Languages with Concatenation ∗ Soonho Kong Wontae Choi Kwangkeun Yi Seoul National University {soon,wtchoi,kwang}@ropas.snu.ac.kr Abstract This article, based on Doh, Kim, and Schmidt’s “abstract parsing” technique, presents an abstract interpretation for statically checking the syntax of generated code in two-staged programs. Abstract parsing is a static analysis techniq...
متن کاملPrecise Widening Operators for Proving Termination by Abstract Interpretation
FuncTion is a static analyzer designed for proving conditional termination of C programs by means of abstract interpretation. Its underlying abstract domain is based on piecewise-defined functions, which provide an upper bound on the number of program execution steps until termination as a function of the program variables. In this paper, we fully parameterize various aspects of the abstract do...
متن کامل